/*学生信息的查询*/
require.config({
    paths: {
        "common": "../common/common"
    }
});
define(['common'], function(common) {
    var baseUrl = common.defaultStr();
    var stu_url = {
        "queryStu": baseUrl + "/base/stu/searchStudent.do"
    };

    function queryStu(query) {
        return $.ajax({
            type: "POST",
            url: stu_url.queryStu,
            data: JSON.stringify(query),
            contentType: "application/json; charset=utf-8",
            dataType: 'json',
            xhrFields: {
                withCredentials: true
            },
            crossDomain: true,
        }).done(
            handleSessionTimeOut
        );
    }

    function handleSessionTimeOut(data) {
        if (data && data.retcode === '202') {
            location.reload();
        }
    }

    return {
        queryStu
    }
})
